<template>
  <div class="swiperbox1">
    <!-- <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item
        ><img src="../../../../../public/xiaxia/imgs/4.webp" alt=""
      /></van-swipe-item>
      <van-swipe-item
        ><img src="../../../../../public/xiaxia/imgs/5.webp" alt=""
      /></van-swipe-item>
      <van-swipe-item
        ><img src="../../../../../public/xiaxia/imgs/6.webp" alt=""
      /></van-swipe-item>
      <van-swipe-item
        ><img src="../../../../../public/xiaxia/imgs/7.webp" alt=""
      /></van-swipe-item>
    </van-swipe> -->

    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="itemlist in vantlist" :key="itemlist.id"
        ><img :src="itemlist.img"
      /></van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "SmartHesd",
  data() {
    return {
      vantlist: [],
    };
  },
  created() {
    axios({
      url: "http://d8f7tq.natappfree.cc/lunbo/lunbo",
      params: {
        ltype: "2",
      },
    })
      .then((res) => {
        this.vantlist = res.data.data;
      })
      .catch((err) => {
        console.log("出错了", err);
      });
  },
};
</script>

<style scoped>
.swiperbox1 {
  height: 100%;
  overflow: hidden;
  margin: 0 0.15rem;
  border-radius: 0.1rem;
}
.van-swipe__track {
  display: flex;
}
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  height: 2.28rem;
  text-align: center;
  width: 100%;
  background-color: #39a9ed;
}
.van-swipe-item {
  height: 2.29rem;
  border: 0.1rem;

  overflow: hidden;
}
.van-swipe-item > img {
  width: 100%;
  height: 100%;
}
</style>